// components/receive/subscribeBar/subscribeBar.js
import api from '../../../utils/api';
Component({
  /**
   * 组件的属性列表
   */
  properties: {

  },

  lifetimes:{
    attached:function(){
      this.getNumber()
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
    num:''
  },
  
  /**
   * 组件的方法列表
   */
  methods: {
    goSubscri(){
      wx.navigateTo({
        url: '/pages/receive/subscription/subscription',
      })
    },

    getNumber(){
      let that = this;
      api.getSubscribeNumber({
        success:function(res){
          console.log(res)
          if(res.data.code == 200){
            that.setData({
              num:res.data.data
            })
          }
        }
      })
    }
  }
})
